console.log(1);

async function fun() {

    console.log(2);

    let promise = await new Promise((resolve,rejecct) => {
        resolve(6666);
        console.log('---'); // 异步没有完成，async 函数内下面的部分将阻塞不执行；
        return 1;
    }); 
    console.log(promise);

    console.log(4);

    {
        await new Promise((resolve,reject) => {
            console.log('--------');
            resolve('--------')
        })
    }

    return promise;
}


fun().then(res => {
    console.log(5);
    console.log(res);
});

console.log(6);